package com.rabbitmqspringboot.listener;


import com.rabbitmqspringboot.constant.Constants;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class workListener {
    @RabbitListener(queues = Constants.WORK_QUEUE)
    public void work1(String message) {
        System.out.println("workListener1接收到的消息是：" + message);
    }
    @RabbitListener(queues = Constants.WORK_QUEUE)
    public void work2(String message) {
        System.out.println("workListener2接收到的消息是：" + message);
    }

}
